import request from '@/utils/request'

// 学段列表
export function findAllLearningPhase() {
  return request({
    url: '/course/basic/findAllLearningPhase',
    method: 'get'
  })
}

// 年级列表
export function gradeList(learningPhaseId) {
  return request({
    url: '/course/basic/getGradeByPhaseId?learningPhaseId=' + learningPhaseId,
    method: 'get'
  })
}

// 学科列表
export function subjectList(learningPhaseId) {
  return request({
    url: '/course/basic/getSubjectByPhaseId?learningPhaseId=' + learningPhaseId,
    method: 'get'
  })
}

// 版本列表
export function versionsList(learningPhaseId) {
  return request({
    url: '/course/basic/pageBookVersionList?learningPhaseId=' + learningPhaseId,
    method: 'get'
  })
}

// 册别列表
export function volumesList(learningPhaseId) {
  return request({
    url: '/course/basic/getVolumeByphaseId?learningPhaseId=' + learningPhaseId,
    method: 'get'
  })
}

/**
 * 根据年级获取班级列表
 * @param {Object} params 查询条件
 */
export function getClassByGrade(params) {
  return request({
    url: '/course/basic/getClassByGrade',
    method: 'get',
    params
  })
}

/**
 * 获取学生列表
 * @param {Object} params
 * gradeId  年级ID
 * className 班级名称
 */
export function selectStudentInfo(params) {
  return request({
    url: '/course/basic/selectStudentInfo',
    method: 'get',
    params
  })
}
